//
//  HomeChildController.swift
//  jingxin
//
//  Created by Yuki on 2020/8/5.
//  Copyright © 2020 Zl. All rights reserved.
//

import UIKit

class HomeChildController: BaseController {
    
    /**  修改电池栏颜色  **/
    override var preferredStatusBarStyle: UIStatusBarStyle{
        return .lightContent;
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.white;
        self.titleStr = "子界面";
        
        let btn = createBtn(withTitle: "push", withFontSize: 14, withTitleColor: UIColor.black);
        self.view.addSubview(btn);
        btn.snp_makeConstraints { (make) in
            make.centerY.centerX.equalTo(self.view);
            make.size.equalTo(CGSize.init(width: 100, height: 100));
        };
        btn.backgroundColor = UIColor.yellow;
        
        btn.addTarget(self, action:#selector(jumpToChild), for: .touchUpInside);
    }
    
    @objc private func jumpToChild() {
        self.navigationController?.pushViewController(Home_ThirdController(), animated: true);
    }
    
    //
    //    /// 获取数据
    //    func getData() {
    //        let cmdStr = "index/recommendIndex";
    //        let param = ["currentNum":"1"];
    //
    //        RequestManager.postRequestWith(cmd: cmdStr, param: param as NSDictionary) { (responseData) in
    //            let dic:[String :Any] = responseData["data"] as! [String :Any];
    //            let list:NSArray = dic["page"] as! NSArray;
    //            let ary = JSONDeserializer<HomeModel2>.deserializeModelArrayFrom(array: list)!;
    //            self.ary.append(contentsOf: ary);
    //        }
    //
    //    }
    //
    
}
